﻿@using RBS.Core.Extension
@using Webdiyer.WebControls.Mvc
@model Webdiyer.WebControls.Mvc.PagedList<RBS.Core.Model.U_User_Integration>

@{
    ViewBag.Title = "我的积分";
    Layout = "~/Views/Shared/_UserLayout.cshtml";
}

<!--导航栏-->
@{
    @Html.Partial("_Location");
}
<!--/导航栏-->

<!--工具栏-->
 

<!--列表-->
<div class="tbllist">
    	<div class="btminfo1">当前可用积分<b>@ViewBag.IntegralCount</b>分。</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
    <tr>

        <th>时间
        </th>
        <th>数额
        </th>
        <th>类型
        </th>
        <th>相关信息
        </th>

    </tr>
    </tr> 
    @if (null != ViewData.Model)
    {
        foreach (var item in ViewData.Model)
        {
        <tr>
            <td align="center">
                @(string.Format("{0:yyyy-MM-dd HH:mm}", item.PointTime))
            </td>
            <td align="left">
                @Html.DisplayFor(modelItem => item.Point)
            </td>
            <td align="center">
                @Html.HtmlIntegraType(item.Type)
            </td>
            <td align="left">
                @if (item.HotelId != -1)
                {
                    try
                    {
                        if (item.Type == 6 || item.Type == 7)
                        {
                            @(new RBS.Core.BLL.U_User().GetModel(item.HotelId).U_Name)
                        }
                        else if (item.Type == 4 || item.Type == 5)
                        {
                            @(new RBS.Core.BLL.Hotel.H_Hotels().GetModel(item.HotelId).H_Name)
                        }
                    }
                    catch 
                    {
                    }
                }
                 
            </td>
        </tr>
        }
    }
</table>
        </div>
<!--/列表-->
<!--内容底部-->
<div class="line20">
</div>
<div class="pagelist">
    <div class="l-btns">
        <span>显示</span> <span>10 条/页</span><span>共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</span>
    </div>
    @Html.Pager(Model, new PagerOptions { PageIndexParameterName = "id", ShowPageIndexBox = true, PageIndexBoxType = PageIndexBoxType.DropDownList, ShowGoButton = false, CurrentPagerItemWrapperFormatString = "<span class=\"current\">{0}</span>" }, new { id = "PageContent", @class = "default" })
    @section Scripts{@{Html.RegisterMvcPagerScriptResource();}}
</div>
<!--/内容底部-->
